package com.tuananh.radnom.model.iputils;

import javax.xml.bind.annotation.XmlAttribute;

import com.tuananh.radnom.model.utils.IPUtils;

public class IPFilter {
	String startIP;
	String endIP;
	@XmlAttribute(name="start",required=true)
	public String getStartIP() {
		return startIP;
	}
	public void setStartIP(String startIP) {
		this.startIP = startIP;
	}
	@XmlAttribute(name="end",required=false)
	public String getEndIP() {
		return endIP;
	}
	public void setEndIP(String endIP) {
		// the startIP must lower than the end
		if (IPUtils.ipCompare(this.startIP,endIP)>0){
			return;
		}
		this.endIP = endIP;
	}
}
